package com.ruoyi.polyv.web;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.polyv.sdk.PolyvSDKClient;

/**
 * Hello world!
 *
 */
@SpringBootApplication
@EnableAutoConfiguration(exclude={DataSourceAutoConfiguration.class})
public class PolyvWebStart 
{
    public static void main( String[] args )
    {
    	SpringApplication.run(PolyvWebStart.class, args);
    }
    
    @RestController
    public class HelloWorldController {
        @RequestMapping("/hello")
        public String index() {
        	
        	PolyvSDKClient client = PolyvSDKClient.getInstance();
            client.setReadtoken("nsJ7ZgQMN0-QsVkscukWt-qLfodxoDFm");
            client.setWritetoken("Y07Q4yopIVXN83n-MPoIlirBKmrMPJu0");
            client.setSecretkey("DFZhoOnkQf");
            client.setUserid("sl8da4jjbx");
            return "Hello World";
        }
    }
}
